-- GENERATED SPELL FOR [Hakkari Shadowcaster] --


function spell0_11338(pUnit, Event) --@Mana Burn,n/a--
pUnit:FullCastSpellOnTarget(22947,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11338', 2000, 1)
end

function spell1_11338(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(15232,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11338', 3000, 1)
end

function spell2_11338(pUnit, Event) --@Shadow Bolt Volley,n/a--
pUnit:FullCastSpellOnTarget(20741,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11338', 526, 1)
end

function Sorts_11338(pUnit, Event)
local choix_sorts_11338 = math.random(0, 2)
if choix_sorts_11338 == 0 then
pUnit:RegisterEvent('spell0_11338', 1, 1)
end
if choix_sorts_11338 == 1 then
pUnit:RegisterEvent('spell1_11338', 1, 1)
end
if choix_sorts_11338 == 2 then
pUnit:RegisterEvent('spell2_11338', 1, 1)
end
end

function mob11338_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11338', math.random(1500, 3000), 1)
end

function mob11338_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11338_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11338_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11338, 1, 'mob11338_Action')
RegisterUnitEvent(11338, 2, 'mob11338_Leave')
RegisterUnitEvent(11338, 3, 'mob11338_Kill')
RegisterUnitEvent(11338, 4, 'mob11338_Die')
